<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Forpastime < 564179234@qq.com>
// +----------------------------------------------------------------------
namespace plugins\wxapp_broadcast\validate;

use think\Validate;

class RoomValidate extends Validate
{
    protected $rule = [
        'name' => 'require',
        'coverImg' => 'require',
        'startTime' => 'require',
        'endTime' => 'require',
        'anchorName' => 'require',
        'anchorWechat' => 'require',
        'shareImg' => 'require',
        'type' => 'require',
        'screenType' => 'require',
        'closeLike' => 'require',
        'closeGoods' => 'require',
        'closeComment' => 'require',
    ];
    protected $message = [
        'name.require' => '直播间名字有误',
        'coverImg.require' => '背景图有误',
        'startTime.require' => '直播计划开始时间有误',
        'endTime.require' => '直播计划结束时间有误',
        'anchorName.require' => '主播昵称有误',
        'anchorWechat.require' => '主播微信号有误',
        'shareImg.require' => '分享图有误',
        'type.require' => '直播间类型有误',
        'screenType.require' => '横屏、竖屏有误',
        'closeLike.require' => '是否关闭点赞有误',
        'closeGoods.require' => '是否关闭货架有误',
        'closeComment.require' => '是否关闭评论有误',
    ];

    protected $scene = [
//        'add'  => ['user_login,user_pass,user_email'],
//        'edit' => ['user_login,user_email'],
    ];
}